package es.juanc.tree;

import java.util.ArrayList;
import java.util.List;

public class Node {

	private String type;
	private String name;
	private Node parent;
	private List<Node> subnodes = new ArrayList<Node>();

	public Node(String type, String name, Node parent) {
		this.type = type;
		this.name = name;
		this.parent = parent;
	}

	public String getType() {
		return type;
	}

	public String getName() {
		return name;
	}

	public Node getParent() {
		return parent;
	}

	public List<Node> getSubnodes() {
		return subnodes;
	}

	@Override
	public String toString() {
		return "Node [name=" + name + ", type=" + type + "]";
	}
}